//
//  OCUserService.h
//  OCBase
//
//  Created by Duncan on 2021/1/12.
//

#import <Foundation/Foundation.h>

#define WQShare [OCUserService share]


NS_ASSUME_NONNULL_BEGIN

@interface OCUserService : NSObject

+ (instancetype)share;

/// 是否游客登录
@property (nonatomic, assign) BOOL isVisitorsLogin;

/// 判断是否登录
@property (nonatomic, assign) BOOL           isLogin;
/// 判断是否登录并且跳出登录界面
@property (nonatomic, assign) BOOL           isLoginUserAndPresent;

// 家庭
@property (strong, nonatomic) ThingSmartHomeManager *homeManager;
@property (nonatomic, strong) NSArray<ThingSmartHomeModel *> *homes;
@property (strong, nonatomic) ThingSmartHome *userHomeModel;


#pragma mark ------- Http Mehods -------

- (void)loginSuccessMethods;

/// 添加设备
- (void)addDeviceMethods;
/// 打开配网扫一扫
- (void)openScanMainMethods;
/// 创建场景
- (void)addSceneMainMethods;

#pragma mark ------- 家庭 -------

/// 弹出切换家庭view
- (void)showExchangeFramilyListView;

// 更新家庭数据
- (void)updateHomeDetail;


#pragma mark ------- Public Methods -------

/// 保存
- (void)save;
/// 保存并发送用户信息变更通知
- (void)saveAndPostNotification;
/// 退出登录，token过期等
- (void)logutOutOrTokenOverdue;


/// 获取用户token
+ (NSString *)getUserToken;
+ (NSString *)getUserID;

@end

NS_ASSUME_NONNULL_END
